﻿Imports CoreFX
Imports CoreFX.Interfaces
Namespace Messages
    Public Class MessageSubscriber
        Public Sub New()
            [Global].Services.ServiceInstance.Get(Of IMessage).Register(Me)
        End Sub
        <Messaging.MessageSubscribe(GetType(StartupMessage))> _
        Public Sub HandleMessage(ByVal E As StartupMessage)
            [Global].Services.ServiceInstance.Get(Of ILogging).AddItem("NSTests_HandleMessage: Received Startup Message", Logging.MessageType.General)
        End Sub
        <Messaging.MessageSubscribe(GetType(ShutdownMessage))> _
        Public Sub HandleSDMessage(ByVal E As ShutdownMessage)
            [Global].Services.ServiceInstance.Get(Of ILogging).AddItem("NSTests_HandleMessage: Received Shutdown Message", Logging.MessageType.General)
        End Sub
    End Class
End Namespace